package com.healthcloud.service.impl;

import com.healthcloud.dao.losewisdom.LoseWisdomScreeningGadDao;
import com.healthcloud.dto.req.losewisdom.LoseWisdomListReq;
import com.healthcloud.entity.losewisdom.LoseWisdomScreeningGadEntity;
import com.healthcloud.service.losewisdom.LoseWisdomScreeningGadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import com.healthcloud.utils.PageParam;
import org.springframework.transaction.annotation.Transactional;

import java.util.Date;
import java.util.List;


@Service("loseWisdomScreeningGadService")
@Transactional(rollbackFor = Exception.class)
public class LoseWisdomScreeningGadServiceImpl implements LoseWisdomScreeningGadService {

	@Autowired
	private LoseWisdomScreeningGadDao loseWisdomScreeningGadDao;
	
	@Override
	public LoseWisdomScreeningGadEntity queryObject(Integer id){
		return loseWisdomScreeningGadDao.queryObject(id);
	}
	
	@Override
	public List<LoseWisdomScreeningGadEntity> queryList(LoseWisdomListReq bean, PageParam pageParam){
		return loseWisdomScreeningGadDao.queryList(bean, pageParam);
	}
	
	@Override
	public int queryTotal(LoseWisdomListReq bean){
		return loseWisdomScreeningGadDao.queryTotal(bean);
	}
	
	@Override
	public void save(LoseWisdomScreeningGadEntity loseWisdomScreeningGad){
		loseWisdomScreeningGad.setCreateTime(new Date());
		loseWisdomScreeningGadDao.save(loseWisdomScreeningGad);
	}
	
	@Override
	public void update(LoseWisdomScreeningGadEntity loseWisdomScreeningGad){
		loseWisdomScreeningGad.setUpdateTime(new Date());
		loseWisdomScreeningGadDao.update(loseWisdomScreeningGad);
	}
	
	@Override
	public void delete(Integer id){
		loseWisdomScreeningGadDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Integer[] ids){
		loseWisdomScreeningGadDao.deleteBatch(ids);
	}
	
}
